

export default function initRtcPlayer(ele) {
  let player = null
  // // 播放器存在 清空重置
  // if (this.player) {
  //   this.player.destroy();
  //   this.player = null;
  // }
  let videoDom = document.getElementById(`${ele}`);
  player = new JSWebrtc.Player(url, {
    video: videoDom,
    autoplay: true,
    onPlay: obj => {
      videoDom.addEventListener('canplay', function (e) {
        videoDom.play();
      });
      console.log(obj, '播放器开始播放！');
    }
  });
}